package com.ruoyi.info.service.impl;

import java.util.List;

import com.ruoyi.info.domain.FangHouseType;
import com.ruoyi.info.mapper.FangHouseTypeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.info.mapper.FangHouseMapper;
import com.ruoyi.info.domain.FangHouse;
import com.ruoyi.info.service.IFangHouseService;

/**
 * 楼盘表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-16
 */
@Service
public class FangHouseServiceImpl implements IFangHouseService 
{
    @Autowired
    private FangHouseMapper fangHouseMapper;

    @Autowired
    private FangHouseTypeMapper fangHouseTypeMapper;

    /**
     * 查询楼盘表
     * 
     * @param id 楼盘表主键
     * @return 楼盘表
     */
    @Override
    public FangHouse selectFangHouseById(Integer id)
    {
        return fangHouseMapper.selectFangHouseById(id);
    }

    /**
     * 查询楼盘表列表
     * 
     * @param fangHouse 楼盘表
     * @return 楼盘表
     */
    @Override
    public List<FangHouse> selectFangHouseList(FangHouse fangHouse)
    {
        return fangHouseMapper.selectFangHouseList(fangHouse);
    }

    /**
     * 新增楼盘表
     * 
     * @param fangHouse 楼盘表
     * @return 结果
     */
    @Override
    public int insertFangHouse(FangHouse fangHouse)
    {
        return fangHouseMapper.insertFangHouse(fangHouse);
    }

    /**
     * 修改楼盘表
     * 
     * @param fangHouse 楼盘表
     * @return 结果
     */
    @Override
    public int updateFangHouse(FangHouse fangHouse)
    {
        return fangHouseMapper.updateFangHouse(fangHouse);
    }

    /**
     * 批量删除楼盘表
     * 
     * @param ids 需要删除的楼盘表主键
     * @return 结果
     */
    @Override
    public int deleteFangHouseByIds(Integer[] ids)
    {
        return fangHouseMapper.deleteFangHouseByIds(ids);
    }

    /**
     * 删除楼盘表信息
     * 
     * @param id 楼盘表主键
     * @return 结果
     */
    @Override
    public int deleteFangHouseById(Integer id)
    {
        return fangHouseMapper.deleteFangHouseById(id);
    }

    @Override
    public List<FangHouseType> getHouseType() {
        List<FangHouseType> houseType = fangHouseTypeMapper.getHouseType();
        return houseType;
    }
}
